/**
 * ! 筛选{param}参数
 */
export function sift_query_list(query) {
    const query_ = {};
    for (const param in query) {
        if (['', null, undefined].indexOf(query[param]) !== -1) continue;
        query_[param] = query[param];
    }

    return query_;
}
/**
 * ! 权限处理工具
 */
export function hasPermission(permissions, route){
        if (route.name) {
        for (let permission of permissions) {
            if (permission.name === route.name) return true;
            if (permission.submenus) {
                for (let submenu of permission.submenus) {
                    if (submenu.name === route.name) return true;
                }
            }
        }
        return false;
    } else {
        return true;
    }
}